{% extends "afcp/admin/admin.html" %}
{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The about page of the AFCP webapp, French version (fr).
  
  Created on 2008-11-20.
  $Id: about_fr.html 298 2008-12-11 18:10:46Z heavyzheng $
-->
{% endcomment %}
{% load i18n %}

{% block header %}
{% endblock %}{# header #}

{#------------------------------------------------------------------------------------------------#}
{% block html_title %}
<title>Admin console</title>


<link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/afcp/stylesheets/sections.css"/>

<script type="text/javascript">//<![CDATA[

function closeMessage() {
    $(".message").hide("slow");
}

function showInscription() {
    $("#edit_activity"  ).hide();
    $("#activity"       ).show("slow");
}

function showEditForm() {
    $("#activity"       ).hide();
    $("#edit_activity"  ).show("slow");
}

function submitEditForm() {
   // $("#edit_inscription :button").attr("disabled", "disabled");
    $("#edit_activity").submit();
}
//]]></script>
{% endblock %}{# html_title #}

{#------------------------------------------------------------------------------------------------#}


{% block content %}

<div class="section">
   <h1>AFCP Admin Console</h1>

{% if info %}
  <div class="info message">
    {{ info|escape }}
    <a href="javascript:void(0);" onclick="closeMessage();">[close]</a>
  </div>
{% endif %}

{% if error %}
  <div class="error message">
    {{ error|escape }}
    <a href="javascript:void(0);" onclick="closeMessage();">[close]</a>
  </div>
{% endif %}


       
    <form  id="edit_activity" action="." method="POST" enctype="multipart/form-data">

	  {% if isUpdateMode %}
		<h3>Update your activity information...</h3>
	 {% else %}
		<h3>Create your activity information...</h3>
	 {% endif %}
        <!-- form table -->
        <table>
		 <tr class="hidden">
            <td class="nowrap" width="1%" align="right">{% trans "uid" %} :</td>
            <td class="nowrap">
              <input type="text" size="40" name="uid" value="{{ activity.uid|escape }}"/>
            </td>
          </tr>
		  
          <tr>
            <td class="nowrap" width="1%" align="right">{% trans "Name" %} :</td>
            <td class="nowrap">
              <input type="text" size="40" name="name" value="{{ activity.name|escape }}"/>
            </td>
          </tr>
		  
		  <tr>
            <td class="nowrap" width="1%" align="right">{% trans "Subject" %} :</td>
            <td class="nowrap">
              <input type="text" size="40" name="subject" value="{{ activity.subject|default:""|escape }}"/>
            </td>
          </tr>
		  
		  <tr>
            <td class="nowrap" width="1%" align="right">{% trans "Address" %} :</td>
            <td class="nowrap">
              <input type="text" size="40" name="address" value="{{ activity.address|default:""|escape }}"/>
            </td>
          </tr>
		  
          <tr>
            <td class="nowrap" width="1%" align="right">{% trans "Date" %} :</td>
            <td class="nowrap">
              <input type="text" size="20" name="date" value="{{ activity.date|date:"Y-m-d H:i" }}"/>
              (YYYY-MM-DD HH:mm)
            </td>
          </tr>
		  
		  </tr>
		  
		  <tr>
            <td></td>
            <td class="nowrap">
			{% if isUpdateMode %}
				<input type="button" value="{% trans "Update" %}" onclick="submitEditForm();"/>
			{% else %}
				<input type="button" value="{% trans "Confirm" %}" onclick="submitEditForm();"/>
			{% endif %}
            </td>
          </tr>	 
		  
 
		  
        </table>
    </form> 
	
</div><!-- section-->
	  <div class="section-footer">
  
      You have these operations about this activity:
	  <br/>
        <a href="/afcp/admin/activity/">Return to list</a>

    </div><!--/.section-footer-->

	
{% endblock %}{# content #}

{#------------------------------------------------------------------------------------------------#}







